package com.jinglu.cloud.common.exception;

import lombok.Data;

/**
 * @Author zhaotengfei
 * @Datetime 2021/2/10-下午10:11
 */
@Data
public class GenericException extends IllegalArgumentException {

    private static final long serialVersionUID = -8470467500110025835L;

    private String errorCode;

    public GenericException(String message) {
        super(message);
    }

    public GenericException(String errorCode, String message) {
        super(message);
        this.errorCode = errorCode;
    }

    public GenericException(String message, Throwable cause) {
        super(message, cause);
    }

    public GenericException(String errorCode, String message, Throwable cause) {
        super(message, cause);
        this.errorCode = errorCode;
    }

    public int getHttpStatus() {
        return 500;
    }
}
